#!/user/bin/env python3
# -*- coding: utf-8 -*-
from v5.base.base import Base
from v5.page import Elements


class PageLogin(Base):
    # 输入用户名 封装
    def page_input_username(self, username):
        self.base_input(Elements.login_username, username)

    # 输入密码 封装
    def page_input_password(self, pwd):
        self.base_input(Elements.login_password, pwd)

    # 点击登录 封装
    def page_click_login_btn(self):
        self.base_click(Elements.login_btn)

    # 组合 封装
    def page_login(self, username, pwd):
        self.page_input_password(username)
        self.page_input_password(pwd)
        self.page_click_login_btn()
